home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Magazine / ActiveShareware / SecondSpin / Install-SecondSpin < prev    next >
Encoding:
Text File  |  2001-05-05  |  11.5 KB  |  546 lines

  1. ; SecondSpin Installer - Rev0030 - 03/02/2000
  2. ; Install script (C) Kristian Van Der Vliet 1999
  3. ; Additional stuff (C) -zuulikuuli 2000-2001
  4. ;
  5. ; Note to anyone reading this: Do not change this script. Do not copy wholesale
  6. ; from it. Do not even think about it. Email me (In the docs) if you want some
  7. ; help with installer scripts.
  8. ;
  9. ; Expert users: There is no expert mode. Sorry. Still, i cant think it would get
  10. ; much harder as it stands anyway....
  11. ;
  12. ; SecondSpin (c) -zuulikuuli
  13.  
  14. (set @app-name
  15. (cat "SecondSpin"
  16. ))
  17.  
  18. (set #welcome
  19. (cat "Welcome to the Installer for SecondSpin.\nInstaller script ©1999 Kristian Van Der Vliet & \n©2000-2001 Lauri Ahonen (Author of SS)\n\nPlease make sure you have obtained both archives!"
  20. ))
  21.  
  22. (set @default-dest
  23. (cat "Work:"
  24. ))
  25.  
  26. (welcome #welcome)
  27.  
  28. ; We need to be sure that Processor archive has been installed too!
  29.  
  30.  (set encoderdir
  31. (cat "encoders"
  32. ))
  33.  
  34. (if (NOT (exists encoderdir))
  35.     (MESSAGE "\nUnable to locate MP3 Encoder archive files.\n\nMP3 mode will be disabled!\n\nIf you have an additional encoder executable\nplease copy it to SecondSpin:external_commands/")
  36.  
  37. )
  38.  
  39. ; First we want a proper destination dir for the main files
  40.  
  41. (set @default-dest
  42.     (askdir
  43.         (prompt "Please select a destination directory for the Installation\nof SecondSpin. A directory called SecondSpin will be created there")
  44.         (help "No help as yet")
  45.         (newpath)
  46.         (default "Work:")
  47.     )
  48. )
  49.  
  50. (set @default-dest
  51.     (tackon @default-dest "SecondSpin")
  52. )
  53.  
  54. ; Ask which CPU the user has 
  55.  
  56. (set #cpu-version
  57. (askchoice 
  58.     (prompt "Please select the CPU version of SecondSpin you would like to install.")
  59.     (help "In order to provide the best speed when handling MPEG Audio, SecondSpin offers several different executables for different processors. SecondSpin requires FPU")
  60.     (choices "PPC (PowerUP)" "PPC (WarpOS)" "060 with FPU" "040 with FPU" "030 with FPU" "020 with FPU")
  61. ))
  62.  
  63. ; Now we need a few configuration details to set the ENV: labels
  64. ; First the device name
  65.  
  66. (set #cd-device
  67. (askstring
  68.     (prompt "Please enter the AmigaDOS device name for your CD-Rom drive.")
  69.     (help "You should enter the AmigaDOS device name for the interface that your CD-Rom drive is connected to I.E scsi.device")
  70.     (default "scsi.device")
  71. ))
  72.  
  73. ; Now the device unit
  74.  
  75. (set #cd-unit
  76. (asknumber
  77.     (prompt "Please enter the Unit number for your CD-Rom drive.")
  78.     (help "You should enter the Unit number for your CD-Rom drive. For an IDE/ATAPI drive this may be 0 or 1, SCSI drives will typically be in the range 0-7.")
  79.     (default 0)
  80.     (range 0 15)
  81. ))
  82.  
  83. ; Finally the CD-Rom type (for cdda_plan)
  84.  
  85. (set #cd-type
  86. (askchoice
  87.     (prompt "Please select your CD-ROM type from the list below.\nNote: If your CD-ROM doesn't work with the selected setting,\nplease reinstall with another type!")
  88.     (help "The CD-DA ripper that SecondSpin uses works slightly diferently depending on the make of CD-ROM drive. If you have an IDE/ATAPI drive you should select either 'ATAPI' or 'Old ATAPI' from the list. SCSI drive users should consult their manual, but 'ATAPI' might work fine with most SCSI devices.\n\nNote: Not all CD-ROM drives support CD-DA sampling. If you have such a drive, you may find that the Audio CD-DA quality is poor, or the drive gives eratic results when sampling. This is not caused by SecondSpin.")
  89.     (choices "Sony CDU 8003 and compatible" "Toshiba XM3401TA and compatible" "NEC 2X and 3X" "Some Grundig & Toshiba CD-ROM's" "Standard ATAPI / SCSI" "Old ATAPI" "None of the above")
  90. ))
  91.  
  92. ; Do the bits here to check #cd-type and set #cd-plan acordingly
  93.  
  94. (select #cd-type
  95.     (set #cd-plan "a")
  96.     (set #cd-plan "b")
  97.     (set #cd-plan "c")
  98.     (set #cd-plan "d")
  99.     (set #cd-plan "e")
  100.     (set #cd-plan "f")
  101.     (set #cd-plan "n")
  102. )
  103.  
  104. (set #cdid-path
  105.     (askdir
  106.         (prompt "If you've got a CDID library,\nplease specify it's location. Otherwise select default.")
  107.         (help "No help as yet")
  108.         (newpath)
  109.         (default "SecondSpin:disks/")
  110.     )
  111. )
  112.  
  113. (set #sid4amiga-version
  114. (askchoice 
  115.     (prompt "Please select which cpu version of the SID4AMIGA SID engine\nwould you like to install.")
  116.     (help "SID4AMIGA (c) Paul Heams.\n\n")
  117.     (choices "PPC (WarpOS)" "040 with FPU" "020 without FPU")
  118. ))
  119.  
  120.  
  121. ; Now we can start copying our files about
  122. ; Make the main dir & copy the files needed.
  123.  
  124. (makedir @default-dest
  125.     (prompt "Creating directory " @default-dest)
  126.     (help "No help as yet")
  127.     (infos)
  128. )
  129.  
  130. ; Now we can copy the remaining main files
  131.  
  132.  
  133. (copyfiles
  134.     (source "bin/")
  135.     (dest @default-dest)        ; Copy the main files to the dest-dir
  136.     (all)
  137.     (infos)
  138. )
  139.  
  140. (copyfiles
  141.     (source "")
  142.     (pattern "SecondSpin.guide#?")
  143.     (dest @default-dest)
  144. )
  145.  
  146. ;(set #tables-dest
  147. ;(cat @default-dest "/mpeg_tables"    ; We also need a sub-dir "mpeg_tables"
  148. ;))
  149.  
  150. ;(makedir #tables-dest)
  151.  
  152. ;(copyfiles
  153. ;    (prompt "Copying the MPEG Tables to " #tables-dest)
  154. ;    (source "mpeg_tables/")
  155. ;    (dest #tables-dest)
  156. ;    (all)
  157. ;)
  158.  
  159. ; Do the C: S: and LIBS: files
  160.  
  161. (set #cmd-dest
  162. (cat @default-dest "/external_commands"    ; We need an external_commands directory
  163. ))
  164.  
  165. (set #docs-dest
  166. (cat @default-dest "/docs"    ; We need a docs directory
  167. ))
  168.  
  169. (set #catalogs-dest
  170. (cat @default-dest "/Catalogs"    ; We need a catalog directory (Now who changed this? Wasn't me, i would have got it right the first time ;) )
  171. ))
  172.  
  173. (set #example-dest
  174. (cat @default-dest "/example_files"    ; example directory )
  175. ))
  176.  
  177.  
  178. (makedir #cmd-dest)
  179. (makedir #catalogs-dest)
  180. (makedir #example-dest)
  181.  
  182. (copyfiles
  183.     (source "external_commands")
  184.     (dest #cmd-dest)
  185.         (pattern "~(#?SID4AMIGA#?|#?PEGASE_#?)")
  186. )
  187.  
  188. (copyfiles
  189.     (source "example_files")
  190.     (dest #example-dest)
  191.         (pattern "#?")
  192. )
  193.  
  194.  
  195. (copyfiles
  196.     (source "Catalogs")
  197.     (dest #catalogs-dest)
  198.     (all)
  199. )
  200.  
  201.  
  202. ; Now copy the correct CPU version of the encoder
  203. ; Note that this is a little bit neater than the older Installers ;)
  204.  
  205. (set #lamer-dest
  206. (cat @default-dest "/external_commands/"
  207. ))
  208.  
  209.  
  210. (if (exists encoderdir)
  211.  
  212.     (select #cpu-version
  213.  
  214.  
  215. ; PPC PowerUP
  216.         (copyfiles
  217.         (source "encoders/SecondSpin_encoder.elf")
  218.         (dest #lamer-dest)
  219.         (newname "SecondSpin_encoder")
  220.         )
  221.  
  222. ; PPC WarpOS
  223.         (copyfiles
  224.         (source "encoders/SecondSpin_encoder.wos")
  225.         (dest #lamer-dest)
  226.         (newname "SecondSpin_encoder")
  227.         )
  228.  
  229.  
  230. ; 060
  231.     
  232.         (copyfiles
  233.         (source "encoders/SecondSpin_encoder.060fpu")
  234.         (dest #lamer-dest)
  235.         (newname "SecondSpin_encoder")
  236.         )
  237.  
  238. ; 040
  239.  
  240.  
  241.         (copyfiles
  242.         (source "encoders/SecondSpin_encoder.040fpu")
  243.         (dest #lamer-dest)
  244.         (newname "SecondSpin_encoder")
  245.         )
  246.  
  247. ; 030 fpu
  248.         (copyfiles
  249.         (source "encoders/SecondSpin_encoder.020fpu")
  250.         (dest #lamer-dest)
  251.         (newname "SecondSpin_encoder")
  252.         )
  253.  
  254. ; 020 fpu
  255.  
  256.  
  257.         (copyfiles
  258.         (source "encoders/SecondSpin_encoder.020fpu")
  259.         (dest #lamer-dest)
  260.         (newname "SecondSpin_encoder")
  261.         )
  262.  
  263.     )
  264.  
  265. )
  266.  
  267. ; copy Pegase
  268.  
  269.     (select #cpu-version
  270.  
  271.         (copyfiles
  272.         (source "external_commands/Pegase_PPC")
  273.         (dest #lamer-dest)
  274.         (newname "Pegase")
  275.         )
  276.  
  277.         (copyfiles
  278.         (source "external_commands/Pegase_PPC")
  279.         (dest #lamer-dest)
  280.         (newname "Pegase")
  281.         )
  282.     
  283.         (copyfiles
  284.         (source "external_commands/Pegase_060")
  285.         (dest #lamer-dest)
  286.         (newname "Pegase")
  287.         )
  288.  
  289.         (copyfiles
  290.         (source "external_commands/Pegase_040")
  291.         (dest #lamer-dest)
  292.         (newname "Pegase")
  293.         )
  294.  
  295.         (copyfiles
  296.         (source "external_commands/Pegase_030")
  297.         (dest #lamer-dest)
  298.         (newname "Pegase")
  299.         )
  300.  
  301.         (copyfiles
  302.         (source "external_commands/Pegase_030")
  303.         (dest #lamer-dest)
  304.         (newname "Pegase")
  305.         )
  306.  
  307.     )
  308.  
  309. ; copy sid4amiga
  310.  
  311.     (select #sid4amiga-version
  312.  
  313.         (copyfiles
  314.         (source "external_commands/Sid4AmigaWOS")
  315.         (dest #cmd-dest)
  316.         (newname "Sid4Amiga")
  317.         )
  318.     
  319.         (copyfiles
  320.         (source "external_commands/Sid4Amiga040FPU")
  321.         (dest #cmd-dest)
  322.         (newname "Sid4Amiga")
  323.         )
  324.     
  325.         (copyfiles
  326.         (source "external_commands/Sid4Amiga020")
  327.         (dest #cmd-dest)
  328.         (newname "Sid4Amiga")
  329.         )
  330.     
  331.  
  332.     )
  333.  
  334. ; Now the mpega-libs to libs:
  335.  
  336. (set #mpega-dest
  337.     (cat "Libs:"
  338. ))
  339.  
  340.  (set mpegalib
  341. (cat "Libs:mpega.library"
  342. ))
  343.  
  344. (if (NOT (exists mpegalib))
  345. (select #cpu-version
  346.  
  347.     ((copyfiles
  348.         (source "libs-mpega/mpegaPPC.library")            ; PPC
  349.         (dest #mpega-dest)
  350.         (newname "mpega.library")
  351.     )
  352.  
  353.     (copyfiles
  354.         (source "libs-mpega/mpegappcFPU_library.elf")        ; And another PPC library
  355.         (dest #mpega-dest)
  356.         (newname "mpega.library.elf")
  357.     ))
  358.  
  359.     (copyfiles
  360.         (source "libs-mpega/mpega060FPU.library")        ; 060
  361.         (dest #mpega-dest)
  362.         (newname "mpega.library")
  363.     )
  364.  
  365.     (copyfiles
  366.         (source "libs-mpega/mpega040FPU.library")        ; 040
  367.         (dest #mpega-dest)
  368.         (newname "mpega.library")
  369.     )
  370.  
  371.     (copyfiles
  372.         (source "libs-mpega/mpega020FPU.library")        ; 030 fpu
  373.         (dest #mpega-dest)
  374.         (newname "mpega.library")
  375.     )
  376.  
  377. ; Note to any 030 users reading this, sorry, but mpega only comes in 020
  378. ; versions, however the SecondSpin_Encoder DOES, so you do have some advantages
  379. ; over 020 users...
  380.  
  381.     (copyfiles
  382.         (source "libs-mpega/mpega020FPU.library")        ; 020 fpu
  383.         (dest #mpega-dest)
  384.         (newname "mpega.library")
  385.     )
  386.  
  387. )
  388. )
  389.  
  390. ; Now the docs
  391.  
  392. (makedir #docs-dest)
  393.  
  394. (copyfiles
  395.    (source "docs")
  396.    (dest #docs-dest)
  397.    (all)
  398. )
  399.  
  400. (copyfiles
  401.    (source "docs.info")
  402.    (dest @default-dest)
  403.    (nogauge)
  404. )
  405.  
  406. ; Now we copy all of the required libs
  407.  
  408. (copylib
  409.    (source "libs/reqtools.library")
  410.    (dest "LIBS:")
  411.    (optional "nofail")
  412.    (help "No help as of yet.")
  413.    (prompt "SecondSpin needs reqtools.library.")
  414.    (confirm)
  415. )
  416.  
  417. (copylib
  418.    (source "libs/rexxreqtools.library")
  419.    (dest "LIBS:")
  420.    (optional "nofail")
  421.    (help "No help as of yet.")
  422.    (prompt "SecondSpin needs rexxreqtools.library.")
  423.    (confirm)
  424. )
  425.  
  426. (copylib
  427.    (source "libs/rexxtricks.library")
  428.    (dest "LIBS:")
  429.    (optional "nofail")
  430.    (help "No help as of yet.")
  431.    (prompt "SecondSpin needs rexxtricks.library.")
  432.    (confirm)
  433. )
  434.  
  435. (copylib
  436.    (source "libs/triton.library")
  437.    (dest "LIBS:")
  438.    (optional "nofail")
  439.    (help "No help as of yet.")
  440.    (prompt "SecondSpin needs triton.library.")
  441.    (confirm)
  442. )
  443.  
  444. (copylib
  445.    (source "libs/tritonrexx.library")
  446.    (dest "LIBS:")
  447.    (optional "nofail")
  448.    (help "No help as of yet.")
  449.    (prompt "SecondSpin needs tritonrexx.library.")
  450.    (confirm)
  451. )
  452.  
  453. (copylib
  454.    (source "libs/ixemul.library")
  455.    (dest "LIBS:")
  456.    (optional "nofail")
  457.    (help "No help as of yet.")
  458.    (prompt "SecondSpin mpeg tagging needs ixemul.library.\nThe version included is 68020, soft-float.")
  459.    (confirm)
  460. )
  461.  
  462. (copylib
  463.    (source "libs/rmh.library")
  464.    (dest "LIBS:")
  465.    (optional "nofail")
  466.    (help "No help as of yet.")
  467.    (prompt "SecondSpin needs rmh.library.")
  468.    (confirm)
  469. )
  470.  
  471. (copylib
  472.    (source "libs/sndfile.library")
  473.    (dest "LIBS:")
  474.    (optional "nofail")
  475.    (help "No help as of yet.")
  476.    (prompt "LAME engine requires sndfile.library.\nThe version included is 68020 FPU")
  477.    (confirm)
  478. )
  479.  
  480. ;(copylib
  481. ;   (source "libs/2ndspin.library")
  482. ;   (dest "LIBS:")
  483. ;   (optional "nofail")
  484. ;   (help "No help as of yet.")
  485. ;   (prompt "SecondSpin needs several external libraries.\nAll the required ones
  486. ;   (confirm)
  487. ;)
  488.  
  489. ; Bet it didn't copy that library, did it?
  490. ; It'll have to be a filecopy instead, for now.
  491.  
  492. ;(copyfiles
  493. ;   (source "libs/2ndspin.library")
  494. ;   (dest "LIBS:")
  495. ;   (optional "nofail")
  496. ;   (help "No help as of yet.")
  497. ;   (prompt "SecondSpin needs several external libraries.\nAll the required ones
  498. ;   (confirm)
  499. ;   (nogauge)
  500. ;)
  501.  
  502.  
  503. ; Now create the ENV: labels needed for the CDDA ripper
  504.  
  505. (textfile
  506.     (dest "ENVARC:cdda_device")
  507.     (append #cd-device)
  508. )
  509.  
  510. (textfile
  511.     (dest "ENVARC:cdda_unit")
  512.     (append #cd-unit)
  513. )
  514.  
  515. (textfile
  516.     (dest "ENVARC:cdid_path")
  517.     (append #cdid-path)
  518. )
  519.  
  520. ; Check to see if we need a cd-plan before we set it
  521.  
  522. (if (<> #cd-type 6)
  523.     (textfile
  524.         (dest "ENVARC:cdda_plan")
  525.         (append #cd-plan)
  526.     )
  527. )
  528.  
  529. ; Copy the env labels into ENV: to avoid the reboot
  530.  
  531. (copyfiles
  532.     (source "ENVARC:")
  533.      (dest "ENV:")
  534.     (pattern "cdda#?")
  535. )
  536.  
  537. ; Now put the SecondSpin: assign in user-startup
  538.  
  539. (startup "SecondSpin"
  540.     (prompt "Adding assign to your user-startup sequence")
  541.     (help "No help as yet.")
  542.     (command "Assign SecondSpin: " @default-dest" >NIL:")
  543. )
  544.  
  545. ; That's all the work done. Ta da!
  546.